package cn.gov.pbc.gd.credit.common.model;

import java.util.List;
import java.util.Map;

import cn.gov.pbc.gd.credit.vo.menu.ResMenuVo;
import cn.gov.pbc.gd.credit.vo.role.ResRoleVo;

public class UserModel {
	/**
	 * 用户session id
	 */
	private String sid;
	
	/**
	 * 用户姓名
	 */
	private String userName;
	
	/**
	 * 当天查询次数
	 */
	private Integer limitCount;
	
	/**
	 * 头像
	 */
	private String headUrl;
	
	/**
	 * 认证头像url
	 */
	private String certifiedHeadUrl;
	
	/**
	 * 用户ip
	 */
	private String ip;
	
	/**
	 * 来源
	 */
	private int comeFrom;
	
	/**
	 * 用户id
	 */
	private String userId;
	
	private String corpId;
	
	private String deptId;
	
	/**
	 * 用户账号
	 */
	private String account;
	
	/**
	 * 用户角色列表
	 */
	private List<ResRoleVo> roleList;
	
	/**
	 * 菜单列表
	 */
	private List<ResMenuVo> menuList;
	
	/**
	 * 拥有的权限
	 */
	private Map<String, ResMenuVo> powerMap;
	
	/**
	 * cookies值
	 */
	private String cookiesKey;
	
	private Integer authType;
	
    /**
     * 支行名称
     */
    private String corpName;
    
    /**
     * 真实用户账号
     */
    private String realUserAccount;
    
    /**
     * 真实用户账号
     */
    private String realUserId;
    
    /**
     * 用户签名
     */
    private String signName;
    
	public String getSid() {
		return sid;
	}


	public void setSid(String sid) {
		this.sid = sid;
	}


	public String getIp() {
		return ip;
	}


	public void setIp(String ip) {
		this.ip = ip;
	}


	public int getComeFrom() {
		return comeFrom;
	}


	public void setComeFrom(int comeFrom) {
		this.comeFrom = comeFrom;
	}


	public String getUserId() {
		return userId;
	}


	public void setUserId(String userId) {
		this.userId = userId;
	}


	public String getAccount() {
		return account;
	}


	public void setAccount(String account) {
		this.account = account;
	}


	public List<ResRoleVo> getRoleList() {
		return roleList;
	}


	public void setRoleList(List<ResRoleVo> roleList) {
		this.roleList = roleList;
	}

	public Map<String, ResMenuVo> getPowerMap() {
		return powerMap;
	}

	public void setPowerMap(Map<String, ResMenuVo> powerMap) {
		this.powerMap = powerMap;
	}


	public List<ResMenuVo> getMenuList() {
		return menuList;
	}


	public void setMenuList(List<ResMenuVo> menuList) {
		this.menuList = menuList;
	}


	public String getCookiesKey() {
		return cookiesKey;
	}


	public void setCookiesKey(String cookiesKey) {
		this.cookiesKey = cookiesKey;
	}


	public String getCorpId() {
		return corpId;
	}


	public void setCorpId(String corpId) {
		this.corpId = corpId;
	}


	public String getDeptId() {
		return deptId;
	}


	public void setDeptId(String deptId) {
		this.deptId = deptId;
	}

	public Integer getAuthType() {
		return authType;
	}

	public void setAuthType(Integer authType) {
		this.authType = authType;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getHeadUrl() {
		return headUrl;
	}


	public void setHeadUrl(String headUrl) {
		this.headUrl = headUrl;
	}


	public String getCertifiedHeadUrl() {
		return certifiedHeadUrl;
	}

	public void setCertifiedHeadUrl(String certifiedHeadUrl) {
		this.certifiedHeadUrl = certifiedHeadUrl;
	}

	public String getCorpName() {
		return corpName;
	}

	public void setCorpName(String corpName) {
		this.corpName = corpName;
	}

	public String getRealUserAccount() {
		return realUserAccount;
	}

	public void setRealUserAccount(String realUserAccount) {
		this.realUserAccount = realUserAccount;
	}


	public String getRealUserId() {
		return realUserId;
	}


	public void setRealUserId(String realUserId) {
		this.realUserId = realUserId;
	}

	public Integer getLimitCount() {
		return limitCount;
	}

	public void setLimitCount(Integer limitCount) {
		this.limitCount = limitCount;
	}


	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((account == null) ? 0 : account.hashCode());
		result = prime * result + ((corpId == null) ? 0 : corpId.hashCode());
		result = prime * result + ((userId == null) ? 0 : userId.hashCode());
		return result;
	}

	public String getSignName() {
		return signName;
	}

	public void setSignName(String signName) {
		this.signName = signName;
	}


	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		UserModel other = (UserModel) obj;
		if (account == null) {
			if (other.account != null)
				return false;
		} else if (!account.equals(other.account))
			return false;
		if (corpId == null) {
			if (other.corpId != null)
				return false;
		} else if (!corpId.equals(other.corpId))
			return false;
		if (userId == null) {
			if (other.userId != null)
				return false;
		} else if (!userId.equals(other.userId))
			return false;
		return true;
	}

	
}
